/**
 * Foxit Software Inc.
 * Copyright(C) 2005-2014, all rights reserved.
 * The following code is copyrighted and contains proprietary information
 * and trade secrets of Foxit Software Inc.

 * Description: PDFDocProperties
 * Author: shaojie zhuo
 * Update: shaojie zhuo (2014-05-08 09:37)
 */
define(function (require, exports, module) {
    require('./ImageEngine.js');

    /**
     * enum for key of page data in JSON format.
     * @enum
     * @private
     */
    WebPDF.ImageEngine.DocPropertiesJsonFormat = {
        DOC_PROPERTIES_INFO: "dppinfo",
        PROPERTIES: "ppt",
        AUTHOR: "atr",
        CREATOR: "ctr",
        PRODUCER: "pdr",
        TITLE: "title",
        SUBJECT: "sub",
        KEYWORDS: "kwd",
        CREATION_DATE: "ctd",
        MODIFY_DATE: "mdd",
        VERSION: "ver"
    };
    var docPropertiesDataJsonFormat = WebPDF.ImageEngine.DocPropertiesJsonFormat;

    WebPDF.ImageEngine.PDFDocProperties = function (docPropertiesJSONData) {
        this._docPropertiesJSONData = docPropertiesJSONData;
    };

    WebPDF.ImageEngine.PDFDocProperties.prototype = {
        getAuthor: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.AUTHOR];
        },
        getCreator: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.CREATOR];
        },
        getProducer: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.PRODUCER];
        },
        getTitle: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.TITLE];
        },
        getSubject: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.SUBJECT];
        },
        getKeywords: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.KEYWORDS];
        },
        getCreationDate: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.CREATION_DATE];
        },
        getModifyDate: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.MODIFY_DATE];
        },
        getVersion: function () {
            return this._docPropertiesJSONData[docPropertiesDataJsonFormat.VERSION];
        }
    };

    return  WebPDF.ImageEngine.PDFDocProperties;
});